//
//  InvitationPhoneTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/11.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "InvitationPhoneTableViewCell.h"

@implementation InvitationPhoneTableViewCell{
    GLGWLabel * storeNameLabel;
    GLGWLabel * phoneLabel;
    GLGWLabel * oneMLabel;
    GLGWLabel * allBaoJiaLabel;
    GLGWLabel * dellLabel;
    
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        GLGWView * bankgroundView = [[GLGWView alloc] initWithInSuperView:self.contentView];
        bankgroundView.backgroundColor = [UIColor whiteColor];
        [bankgroundView setViewShadowWidth:3.0 theCornerRadius:3.0];
        [bankgroundView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.contentView.mas_left).offset(kWidthProportion_In_iPhoneTriploid(15));
            make.right.equalTo(self.contentView.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(15));
            make.top.equalTo(self.contentView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(10));
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-kHeightProportion_In_iPhoneTriploid(10));
        }];
        //
        storeNameLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(10), KScreenWidth - kWidthProportion_In_iPhoneTriploid(60), kHeightProportion_In_iPhoneTriploid(30)) theFont:SYSTEMFONT(16) theColor:kColor_Rule_Black inSuperView:bankgroundView];
        storeNameLabel.text = @"小张店铺";
        //
        phoneLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(storeNameLabel.x, kY_With_View(storeNameLabel, 0), storeNameLabel.width, storeNameLabel.height) theFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:bankgroundView];
        phoneLabel.text = @"18864606968";
        //
        oneMLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(phoneLabel.x, kY_With_View(phoneLabel, 10), KScreenWidth -kWidthProportion_In_iPhoneTriploid(130), kHeightProportion_In_iPhoneTriploid(17)) theFont:SYSTEMFONT(12) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:bankgroundView];
        oneMLabel.text = @"近一个月报价次数  16次";
        //
        allBaoJiaLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(oneMLabel.x, kY_With_View(oneMLabel, 5), oneMLabel.width, oneMLabel.height) theFont:SYSTEMFONT(12) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:bankgroundView];
        allBaoJiaLabel.text = @"累计报价成交次数  90%";
        //
        dellLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(allBaoJiaLabel.x, kY_With_View(allBaoJiaLabel, 5), allBaoJiaLabel.width, allBaoJiaLabel.height) theFont:SYSTEMFONT(12) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:bankgroundView];
        dellLabel.text = @"总成交率  90%";
        //
        GLGWButton * rightBut = [[GLGWButton alloc] initWithTitle:@"邀请报价" titleLableFont:SYSTEMFONT(12) titleLableColor:[UIColor whiteColor] theCornerRadius:3.0 backgroundColr:kColor_Rule_Yellow inSuperView:bankgroundView];
        [rightBut mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(bankgroundView.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(15));
            make.bottom.equalTo(bankgroundView.mas_bottom).offset(-kHeightProportion_In_iPhoneTriploid(15));
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(60)));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(25)));
        }];
        [rightBut addTarget:self action:@selector(phoneInviateAction) forControlEvents:UIControlEventTouchUpInside];
    }
    return self;
}

-(void)phoneInviateAction{
    if (self.Block_PhoneInviate) {
        self.Block_PhoneInviate();
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
